<div class="layuimini-container layui-anim layui-anim-upbit">
    <div class="layuimini-main">
        <table class="layui-hide" id="table" lay-filter="currentTableFilter"></table>
    </div>
</div>
<script>
var form,table;
var id = getUrlParam("id");
layui.use(['form','table'], function(){
  table = layui.table;
  form = layui.form;
	//第一个实例
  table.render({
	    elem: '#table'
	    ,url: '/private/fees/list/user' //数据接口
	    ,page: true //开启分页
	    ,cols: [[ //表头
	       {type: 'numbers', title: '序号', width:80}
	      ,{field: 'user', title: '缴费用户',templet:  function(d){
		        return d.user.username;
		  	}}
	      ,{field: 'date', title: '缴费时间'}
	      ,{field: 'dict', title: '缴费类型',templet:  function(d){
		        return d.dict.name;
		  	} , width:200}
	      ,{field: 'money', title: '缴纳金额'}
	      ,{field: 'address', title: '缴纳地点'}
	      ,{field: 'remarks', title: '备注', width:150}
	    ]]
  		,where:{id:id} 
	  });
});
function getUrlParam(name) {
	var l = window.location.hash.split("?")[1];
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
    var r = l.match(reg);
    if (r != null) {
        return decodeURI(r[2])
    } else {
        return null
    }
}
</script>